<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<script src="js/jquery-3.2.1.js"></script>

	<body>

		<script>
			$(function() {
				var array = [1, 1, 2, 2, 3, 4, 5, 5, 6, 7, 7];
				var r = [];
				for(var i = 0; i < array.length; i++) {
					for(var j = i + 1; j < array.length; j++)
						if(array[i] === array[j]) j = ++i;
					r.push(array[i]);
				}
				console.log(r)
			})
		</script>

	</body>

</html>